import request from '@/utils/request';

export function getList(params) {
	return request({
		url: '/dish/page',
		method: 'get',
		params: params
	})
}

export function getDishById(params) {
	return request({
		url: '/dish/getDishById',
		method: 'get',
		params: params
	})
}

export function addDish(params) {
	return request({
		url: '/dish',
		method: 'post',
		data: params
	})
}

export function editDish(params) {
	return request({
		url: '/dish',
		method: 'put',
		data: params
	})
}

export function delDish(params) {
	return request({
		url: '/dish/delDish',
		method: 'delete',
		data: params
	})
}

export function updateStatusById(params) {
	return request({
		url: '/dish/updateStatusById?status=' + params.status,
		method: 'put',
		data: params.idList
	})
}